/******************
    变化模块
 *****************/

    //主要几个民族人数变化
    (function(){
        var main_minzu=echarts.init(document.getElementById("main_minzu"));
        option_main_minzu= {
            title: {
                text: '近五年几个主要民族学生人数变化',
                x:'left'
            },
            tooltip : {
                trigger: 'axis',
                axisPointer: {
                    type: 'cross',
                    label: {
                        backgroundColor: '#6a7985'
                    }
                }
            },
            legend: {
                x:'right',
                data:['汉族','满族','蒙古族','回族','藏族','壮族','土家族','苗族','维吾尔族','朝鲜族'],
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis : [
                {
                    type : 'category',
                    boundaryGap : false,
                    data : ['2013年','2014年','2015年','2016年','2017年']
                }
            ],
            yAxis : [
                {
                    type : 'value'
                }
            ],
            series : [

                {
                    name:'汉族',
                    type:'line',
                    stack: '总量',
                    areaStyle: {normal: {}},
                    data:[500, 632, 701, 734, 790, 730, 810]
                },
                {
                    name:'满族',
                    type:'line',
                    stack: '总量',
                    areaStyle: {normal: {}},
                    data:[220, 182, 191, 234, 290, 330, 310]
                },
                {
                    name:'蒙古族',
                    type:'line',
                    stack: '总量',
                    areaStyle: {normal: {}},
                    data:[150, 232, 201, 154, 190, 330, 410]
                },
                {
                    name:'回族',
                    type:'line',
                    stack: '总量',
                    areaStyle: {normal: {}},
                    data:[320, 332, 301, 334, 390, 330, 320]
                },
                {
                    name:'朝鲜族',
                    type:'line',
                    stack: '总量',
                    label: {
                        normal: {
                            show: true,
                            position: 'top'
                        }
                    },
                    areaStyle: {normal: {}},
                    data:[820, 932, 901, 934, 1290, 1330, 1320]
                },
                {
                    name:'壮族',
                    type:'line',
                    stack: '总量',
                    areaStyle: {normal: {}},
                    data:[150, 162, 111, 124, 80, 220, 110]
                },
                {
                    name:'土家族',
                    type:'line',
                    stack: '总量',
                    areaStyle: {normal: {}},
                    data:[100, 102, 171, 164, 60, 30, 110]
                },
                {
                    name:'苗族',
                    type:'line',
                    stack: '总量',
                    areaStyle: {normal: {}},
                    data:[120, 132, 161, 164, 190, 210, 220]
                },
                {
                    name:'维吾尔族',
                    type:'line',
                    stack: '总量',
                    areaStyle: {normal: {}},
                    data:[140, 152, 141, 134, 90, 130, 250]
                },
                {
                    name:'藏族',
                    type:'line',
                    stack: '总量',
                    areaStyle: {normal: {}},
                    data:[120, 132, 101, 134, 90, 230, 210]
                }
            ]
        };
        main_minzu.setOption(option_main_minzu);
    })();

    //民族方差
    (function(){
        var teacher_minzu=echarts.init(document.getElementById("area_points"));
        option_teacher_minzu={
            title : {
            text: '民族方差',
            x:'left'
        },
            tooltip : {
                trigger: 'axis',
                axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                    type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                }
            },
            color:['#006699'],
            legend: {
                orient: 'vertical',
                left: 'right'
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '10%',
                containLabel: true
            },
            xAxis : [
                {
                    type : 'category',
                    axisLabel:{
                        interval:0,
                        rotate:40
                    },
                    data : ['2013', '2014', '2015', '2016', '2017']
                }
            ],
            yAxis: {
                type: 'value',
                boundaryGap: [0, 0.01]
            },
            series : [
                {
                    type:'bar',
                    data:[-1,2,-3,3,-2]
                }
            ]
        };
        teacher_minzu.setOption(option_teacher_minzu);
    })();